- add_to_breadcrumbs _('Wiki'), wiki_path(@wiki)
- breadcrumb_title s_("Wiki|Pages")
- page_title s_("Wiki|Pages"), _("Wiki")
- add_page_specific_style 'page_bundles/wiki'

= render 'shared/wikis/layout' do
  .wiki-page-header
    = render ::Layouts::PageHeadingComponent.new('') do |c|
      - c.with_heading do
        .gl-flex.gl-gap-3
          = wiki_sidebar_toggle_button
          %h1.gl-heading-1.gl-m-0{ data: { testid: 'page-heading' } }
            = s_("Wiki|Wiki pages")
      - c.with_actions do
        .dropdown.gl-inline-block.wiki-sort-dropdown
          .btn-group{ role: 'group' }
            = wiki_sort_controls(@wiki, params[:direction])

        - if can?(current_user, :create_wiki, @project)
          = render Pajamas::ButtonComponent.new(href: wiki_page_path(@wiki, SecureRandom.uuid, random_title: true, view: 'create'), variant: :confirm) do
            = s_("Wiki|New page")

        #js-vue-wiki-more-actions{ data: {
          clone_ssh_url: ssh_clone_url_to_repo(@wiki),
          clone_http_url: http_clone_url_to_repo(@wiki),
          wiki_url: wiki_path(@wiki),
          templates_url: wiki_page_path(@wiki, Wiki::TEMPLATES_DIR),
        } }

  %ul.wiki-pages-list.content-list
    - @wiki_entries.each do |entry|
      = render partial: entry.to_partial_path, object: entry, locals: { context: 'pages' }

  = paginate @pages_list, theme: 'gitlab'
